import requests

cookies = {
    'deviceid': 'add4d9895b72b69dfff17329dbc65ac',
    'Qs_lvt_404253': '1720270183',
    '_ga': 'GA1.1.603706404.1720270186',
    'Qs_pv_404253': '3842753471117236000%2C907568849552889300',
    '_ga_GVCWL6PNZ2': 'GS1.1.1720270186.1.1.1720270302.0.0.0',
}

headers = {
    'Accept': 'application/json, text/plain, */*',
    'Accept-Language': 'zh-CN,zh;q=0.9',
    'Cache-Control': 'no-cache',
    'Connection': 'keep-alive',
    # 'Cookie': 'deviceid=add4d9895b72b69dfff17329dbc65ac; Qs_lvt_404253=1720270183; _ga=GA1.1.603706404.1720270186; Qs_pv_404253=3842753471117236000%2C907568849552889300; _ga_GVCWL6PNZ2=GS1.1.1720270186.1.1.1720270302.0.0.0',
    'Origin': 'https://app.diandian.com',
    'Referer': 'https://app.diandian.com/',
    'Sec-Fetch-Dest': 'empty',
    'Sec-Fetch-Mode': 'cors',
    'Sec-Fetch-Site': 'same-site',
    'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36',
    'language': 'zh',
    'sec-ch-ua': '"Not_A Brand";v="8", "Chromium";v="120", "Google Chrome";v="120"',
    'sec-ch-ua-mobile': '?0',
    'sec-ch-ua-platform': '"macOS"',
}

params = {
    'market_id': '1',
    'genre_id': '0',
    'country_id': '75',
    'device_id': '1',
    'page': '1',
    'time': '1720195200',
    'rank_type': '4',
    'brand_id': '3',
    'k': 'VFJIVF5VX0RdD1FRSVVcVlpBRBBCSkhVWVZeTV8CXVZRQ0lLCRBEEEJKVhNeTR8VAl0=',
}

response = requests.get('https://api.diandian.com/pc/app/v1/rank', params=params, cookies=cookies, headers=headers)
result = response.json()
print(result)
